<script setup>
import { ref } from 'vue'
import Greeting from './components/Greeting.vue'
const userName = ref('王语嫣')
function handleGreet(message) {
  console.log(message)
}
</script>

<template>
  <div>
    <input v-model="userName" placeholder="输入你的名字" />
    <Greeting :name="userName" @greet="handleGreet">
      <p>这是父组件传递的内容。</p>
    </Greeting>
  </div>
</template>

<style scoped>

</style>
